<!-- templates/page/edit_course.html -->

{% extends 'success.html' %}

{% block content %}
  <style>
    h2 {
      color: #3498db; /* 蓝色 */
      margin-top: 30px;
    }

    form {
      margin-top: 20px;
    }

    label {
      font-weight: bold;
      margin-right: 5px;
      color: #333;
    }

    input, select, button, file {
      margin-bottom: 10px;
    }

    button {
      background-color: #3498db; /* 蓝色 */
      color: white;
      padding: 10px 20px;
      border: none;
      cursor: pointer;
      border-radius: 4px;
    }

    button:hover {
      background-color: #2980b9; /* 深蓝色 */
    }

    .return-link {
      margin-top: 10px;
      display: block;
      text-decoration: none;
      color: #3498db; /* 蓝色 */
    }
  </style>

  <h2>编辑课程</h2>

  <form method="post" enctype="multipart/form-data">
    {% csrf_token %}

    <label for="id_course_no">编号：</label>
    {{ edit_course_form.course_no }}
    <br>

    <label for="id_course_name">课程名称：</label>
    {{ edit_course_form.course_name }}
    <br>

    <label for="id_course_hours">课时：</label>
    {{ edit_course_form.course_hours }}
    <br>

    <label for="id_type_id">类型：</label>
    {{ edit_course_form.type_id }}
    <br>

    <label for="id_course_status">状态：</label>
    {{ edit_course_form.course_status }}
    <br>

    <label for="id_course_reqs">要求：</label>
    {{ edit_course_form.course_reqs }}
    <br>

    <label for="id_course_point">学分：</label>
    {{ edit_course_form.course_point }}
    <br>

    <label for="id_course_memo">备注：</label>
    {{ edit_course_form.course_memo }}
    <br>

    <label for="id_course_textbook_pic">书本封面：</label>
    {{ edit_course_form.course_textbook_pic }}
    <input type="file" name="course_textbook_pic">  {# 添加文件输入框 #}
    <br>

    <button type="submit">保存更改</button>
  </form>

  <a class="return-link" href="{% url 'page1' %}">返回</a>
{% endblock %}
